

public class Account {
	
	String curName;
	String curPassword;
	int curLevel;
	
	public Account(String name,String password, int level){
		
		curName = name;
		curPassword = password;
		curLevel = level;
		
	}
	
	public boolean editAccount(String name, int level){
		if(level == 0){
			return false;
		}
		if(name == null && level != 0){
			curLevel = level;
			DatabaseSupport.editAccount(curLevel, curName);
			return true; 				//address database.
		}else{
			curName = name;
			curLevel = level;			//address database.
			DatabaseSupport.editAccount(curLevel,curName);
			return true;
		}
	}
	
	public String getName(){
		return curName;
	}
	
	public int getLevel(){
		return curLevel;
	}
	public String getPassword(){
		return curPassword;
	}
}
